x86/HVM: move vendor independent CPU save/restore logic to shared code
authorJan Beulich <jbeulich@suse.com>
Tue, 9 Oct 2018 14:25:35 +0000 (16:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 9 Oct 2018 14:25:35 +0000 (16:25 +0200)
commit27225bbb6d148f6d373a4a89b0dc3f3f5bf4d193
tree2d7a8d7ed70fededc32f3fa9bd2e69a609e3d220
parent5866b00ce05a7a7c39a0d5eb7f9de4149c5efe8b
x86/HVM: move vendor independent CPU save/restore logic to shared code

A few pieces of the handling here are (no longer?) vendor specific, and
hence there's no point in replicating the code. Zero the full structure
before calling the save hook, eliminating the need for the hook
functions to zero individual fields.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/vm_event.c